package com.homework.ch02.ch022;
class Animal{
    public void test2(){
        System.out.println();
    }
    public void hello(){
        System.out.println("hello");
    }
}
interface num{

}
public class Test2 {
    public static void main(String[] args) {
        new Animal(){
            @Override
            public void test2() {
                System.out.println("父类");
            }
        }.test2();
        Ifly i= new Ifly() {
            @Override
            public void test() {
                System.out.println("接口");
            }
        };
        i.test();
    }
}
